Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the Posts component, define the workoutContextArray that will be the array of prompts that is sent to the above endpoint.
In Posts#Controller, add functionality if the params[:post_type] is "bot", the user that is creating the post shall be the bot in the competition
For testing and initial implementation, a "ChatBot" button has been created in Posts with an onClick event that sends a post request to the fantasy_bot_ai api endpoint "/fitbot/comment", which sends a request to openai with the array of prompts, and receives a GPT reply that is sent to the client. The client then renders the response by creating a post/comment generated by the bot participant in the competition
NOTE*
This is currently in testing mode only. Functionality will not work in deployment as fantasy_bot_ai has not yet been deployed. To test this functionality, open https://github.com/Fantasy-Fit/fantasyfit_bot_ai as per instructions in the README
*END